#include"ThreadPool.hpp"
#include "Task.hpp"
using namespace ThreadPoolModule;

int main()
{
    // ThreadPool<int>* thread_pool = new ThreadPool<int>;
    // 定义只能指针，指向线程池
    ENABLE_FILE_LOG_STRATEGY();

    shared_ptr<ThreadPool<task_t>> tp = make_shared<ThreadPool<task_t>>();
    tp->Start();
    
    int n = 10;
    while(n--)
    {
        tp->Push(task);
        sleep(1);
    }
    tp->Stop();
    tp->Wait();

    return 0;
}